package com.amado.course50java8;

import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
/**
 * 通过-parameters参数使代码编译是带上方法名
 * @author Administrator
 *
 */
public class Paramter {
	public void createUser(String name, int age, int version) {
	}

	public static void main(String[] args) throws Exception {
		for (Method m : Paramter.class.getMethods()) { 
			System.out.println("--------------------");
			System.out.println(" method: " + m.getName()); 
			System.out.println(" return: " + m.getReturnType().getName());
			for (Parameter p : m.getParameters()) {
				System.out.println("parameter:" + p.getType().getName() + ", " + p.getName());
			}   
		}
	}

}
